<template>
	<view class="width:100%">
<!-- 		<Navigate :title="title"></Navigate> -->
		<view>
			<view class="padding text-bold text-xxl">{{detail.title}}</view>
			<view class="margin-left text-gray">{{detail.createTime}}</view>
			<uni-view class="content padding">
				<rich-text :nodes="detail.content|formatRichText" class="content"></rich-text>
			</uni-view>
		</view>
	</view>
</template>

<script>
import Navigate from '@/components/Navigate/index.vue';
import Feedback from '../../components/Feedback/index.vue';
import fetch from '@/common/fetch.js'
export default {
	components: {
		Navigate,
		Feedback
	},
	data() {
		return {
			detail: null,
		};
	},
	onLoad(option) {
		this.getDetail(option.id)
	},
	methods: {
		handleBack() {
			uni.navigateBack();
		},
		getDetail(id){
			fetch.request('/index.php/index/mobile/articleDetail',{id:id},'GET').then(res=>{
				this.detail = res.data
			})
		}
	}
};
</script>

<style lang="less">
.text-bold {
	font-weight: 700;
}
.text-xxl {
	font-size: 21px;
}
.padding {
	padding: 14px;
}
.line-gray,
.lines-gray,
.text-gray {
	color: #aaa;
}
.margin-left {
	margin-left: 14px;
}
</style>
